package com.heoller.service.generator.postprocess;

import com.google.common.collect.Lists;
import com.heoller.dto.CustomParam;
import java.util.List;
import java.util.zip.ZipOutputStream;
import org.springframework.stereotype.Service;

/**
 * @author huliang
 * @date 2021-11-23 15:41
 */
@Service("applicationPostProcessService")
public class ApplicationPostProcessService extends AbstractGeneratorPostProcessService {

    @Override
    public void doPostProcess(ZipOutputStream zip, String module, CustomParam customParam) {
        String javaPath = buildJavaPath(module, customParam);
        List<String> pathList = Lists.newArrayList();
        pathList.add("/command");
        pathList.add("/convert");
        pathList.add("/dto");
        pathList.add("/event/publish/guava");
        pathList.add("/event/publish/mq");
        pathList.add("/event/publish/springboot");
        pathList.add("/event/publish/springcloud");
        pathList.add("/event/subscrib/guava");
        pathList.add("/event/subscrib/mq");
        pathList.add("/event/subscrib/springboot");
        pathList.add("/event/subscrib/springcloud");
        pathList.add("/query");
        pathList.add("/service/impl");
        writePackageInfo(pathList, module, customParam, javaPath, zip);
    }
}
